home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / usr / share / doc / python-utidylib / README.txt < prev   
Text File  |  2004-02-19  |  969b  |  38 lines

  1. This is uTidylib, the Python wrapper for the HTML cleaning
  2. library named TidyLib: http://tidy.sf.net .  Python 2.3 or later
  3. is required to use uTidylib.  Repeat, Python 2.3 or later is
  4. *required* to use uTidylib.
  5.  
  6. Once installed, there are two ways to get help.  The simplest is:
  7.  
  8. $ python
  9. >>> import tidy
  10. >>> help(tidy)
  11. . . .
  12.  
  13. Then, of course, there's the epydoc-generated API documentation, which
  14. is available at site-packages/tidy/apidoc/index.html .
  15.  
  16. __________________
  17.  
  18. 10 Second Tutorial
  19. __________________
  20.  
  21. >>> import tidy
  22. >>> options = dict(output_xhtml=1, add_xml_decl=1, indent=1, tidy_mark=0)
  23. >>> print tidy.parseString('<Html>Hello Tidy!', **options)
  24. <?xml version="1.0" encoding="us-ascii"?>
  25. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  26.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  27. <html xmlns="http://www.w3.org/1999/xhtml">
  28.   <head>
  29.     <title></title>
  30.   </head>
  31.   <body>
  32.     Hello Tidy!
  33.   </body>
  34. </html
  35.  
  36.  
  37. Good luck!
  38.